#include "DatasetReader.h"
DatasetReader *reader = 0;

DatasetReader::DatasetReader(){}


DatasetReader::~DatasetReader(){}


DatasetReader* DatasetReader::getInstance(){

if(reader == 0)
reader = new DatasetReader();

return reader;

}



void DatasetReader::StringExplode(std::string str, std::string separator, std::vector<string>* results){
	int found;
	found = str.find_first_of(separator);
	while(found != string::npos){
		if(found > 0){
			results->push_back(str.substr(0,found));
		}
		str = str.substr(found+1);
		found = str.find_first_of(separator);
	}
	if(str.length() > 0){
		results->push_back(str);
	}
}